<?php
/**
 * CreateTime: 2023/1/11 10:42
 */

namespace App\Http\Requests\MeLawCase;

use App\Http\Requests\BaseRequests;

class MeLawCaseAddRequest extends BaseRequests
{

    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'client_id' => "required",
            'respondent_name' => "required",
            'respondent_id_card' => "required",
            'respondent_phone_ids' => "required",
            'respondent_house_address' =>"required",
            'loans_name' =>"required",
            'loans_contract_code' =>"required",
            'loans_time' =>"required",
            'loans_start_time' =>"required",
            'loans_money' =>"required",
            'loans_output_money_principal' =>"required",
            'loans_output_money_interest' =>"required",
            'loans_input_money_principal' =>"required",
            'loans_input_money_interest' =>"required",
            'loans_overdue_time' =>"required",
        ];
    }

    public function messages()
    {
        return [
            'client_id.required' => "委托方不能为空",
            'respondent_name.required' => "被申请人姓名不能为空",
            'respondent_id_card.required' => "被申请人身份证号码不能为空",
            'respondent_phone_ids.required' => "被申请人电话号码不能为空",
            'respondent_house_address.required' => "被申请人家不能为空",
            'loans_name.required' => "贷款产品名称不能为空",
            'loans_contract_code.required' => "贷款合同编号不能为空",
            'loans_time.required' => "贷款日期不能为空",
            'loans_start_time.required' => "放贷日期不能为空",
            'loans_money.required' => "贷款金额不能为空",
            'loans_output_money_principal.required' => "放贷本金不能为空",
            'loans_output_money_interest.required' => "放贷利息不能为空",
            'loans_input_money_principal.required' => "已还本金不能为空",
            'loans_input_money_interest.required' => "已还利息不能为空",
            'loans_overdue_time.required' => "逾期日期不能为空",
        ];
    }

}